package com.project.utils;

import com.project.pojo.RiskController;

import java.util.List;

public class GetRiskCode {

    public static int getCode(String rule, List<RiskController> list){

        for (RiskController riskController:list){

            if (riskController.getRule().equals(rule)){

                return riskController.getWeight();
            }
        }

        return 0;
    }
}
